<?php
namespace Hanson\MyVbot\Handlers\Contact;

use Hanson\Vbot\Contact\Friends;
use Hanson\Vbot\Contact\Groups;
use Hanson\Vbot\Message\Text;
use Illuminate\Support\Collection;

class ColleagueGroup
{

    public static function messageHandler(Collection $message, Friends $friends, Groups $groups)
    {
        if (in_array($message['from']['NickName'], [
            "别闹啦被子群～",
            '三年二班'
        ])) {
            // $MemberCount
            // var_dump($message['from']['MemberCount']);
            if ($message['type'] === 'text' && str_contains($message['content'], '小王')) {
                Text::send($message['from']['UserName'], "小王老师挺好的[微笑]");
            }
        }
    }
}
